package com.renu.jdependencyanalyser.data;

import com.renu.jdependencyanalyser.core.ClassBorderGene;
import com.renu.jdependencyanalyser.core.JarBorderGene;
import com.renu.jdependencyanalyser.core.ProjectBorderGene;
import com.renu.jdependencyanalyser.core.ProjectInfo;
import com.renu.jdependencyanalyser.freemarker.data.DependencyData;
import com.renu.jdependencyanalyser.model.ClassModel;
import com.renu.jdependencyanalyser.soot.MyAnalysisTransformer;
import com.renu.jdependencyanalyser.window.AnalyserWindow;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import soot.*;

public class ProjectDataCenter {
    public static ProjectInfo projectInfo ;

    public  static ClassModel classModel;


    public static ClassBorderGene borderGene;
    public  static AnalyserWindow analyserWindow ;

    public  static DependencyData dependencyData;

    private static final Logger logger = LoggerFactory.getLogger(ProjectDataCenter.class);


    @Deprecated
    public static void sootAnalyse() {
        //projectInfo.init(sootClasses);
        ProjectBorderGene projectBorderGene = new ProjectBorderGene(projectInfo);
        PackManager.v().getPack("wjtp").add(
                new Transform("wjtp.myAnalysisTransformer",new MyAnalysisTransformer(projectInfo, projectBorderGene)));
        PackManager.v().runPacks();
        System.out.println(Scene.v().getCallGraph().size());
    }


    public static  void asmAnalyse(){
        projectInfo = new ProjectInfo();
        ProjectBorderGene projectBorderGene = new ProjectBorderGene(projectInfo);




    }

}
